package pl.wroc.pwr.docs.repos.dao;

import java.io.IOException;
import java.util.List;

import org.apache.lucene.index.TermFreqVector;
import org.hibernate.search.jpa.FullTextQuery;
import org.hibernate.search.query.facet.Facet;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import pl.wroc.pwr.docs.repos.domain.Document;

public interface SearchDocumentDao {

	Page<Document> search(Pageable p, FullTextQuery fullTextQuery);
	FullTextQuery buildQuery(String content);
	FullTextQuery filtrQuery(FullTextQuery fullTextQuery, List<String> formats);
	FullTextQuery resetQuery(FullTextQuery fullTextQuery);
	List<Facet> getFacets(FullTextQuery fullTextQuery);
	void applyFacets(FullTextQuery fullTextQuery, List<Facet> facets);
	void disableFacets(FullTextQuery fullTextQuery);
	TermFreqVector getTermFreqVector(int id) throws IOException;

}